package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.factory.RemoteDictDataFallbackFactory;
import com.ruoyi.system.api.vo.SysDictDataVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 字典数据服务
 *
 * @author ZhangYu
 * @date 2024/5/28
 */
@FeignClient(contextId = "remoteDictDataService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteDictDataFallbackFactory.class)
public interface RemoteDictDataService {

    /**
     * 通过字典值列表查询数据字典列表
     *
     * @param dictValueList 字典值列表
     * @return 数据字典列表
     */
    @GetMapping("/dict/data/list/value")
    R<List<SysDictDataVO>> dictListByValue(@RequestParam("dictValueList") List<String> dictValueList);

}
